<?php



class CommentMapBuilder implements MapBuilder {

	
	const CLASS_NAME = 'lib.model.map.CommentMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap(CommentPeer::DATABASE_NAME);

		$tMap = $this->dbMap->addTable(CommentPeer::TABLE_NAME);
		$tMap->setPhpName('Comment');
		$tMap->setClassname('Comment');

		$tMap->setUseIdGenerator(true);

		$tMap->addPrimaryKey('ID', 'Id', 'INTEGER', true, null);

		$tMap->addForeignKey('POST_ID', 'PostId', 'INTEGER', 'post', 'ID', true, null);

		$tMap->addColumn('IP', 'Ip', 'VARCHAR', true, 15);

		$tMap->addColumn('NAME', 'Name', 'VARCHAR', true, 50);

		$tMap->addColumn('EMAIL', 'Email', 'VARCHAR', true, 100);

		$tMap->addColumn('URL', 'Url', 'VARCHAR', true, 100);

		$tMap->addColumn('CONTENT', 'Content', 'LONGVARCHAR', true, null);

		$tMap->addColumn('DATETIME', 'Datetime', 'TIMESTAMP', false, null);

		$tMap->addColumn('APPROVED', 'Approved', 'INTEGER', true, null);

		$tMap->addForeignKey('USER_ID', 'UserId', 'INTEGER', 'user', 'ID', false, null);

	} 
} 